Skip to content

chore(package): add package.json as an export#1670

Merged
xobotyi merged 1 commit into
react-hookz:masterfrom
clementprevot:master
Jul 25, 2026
Merged

chore(package): add package.json as an export#1670
xobotyi merged 1 commit into
react-hookz:masterfrom
clementprevot:master

Conversation

@clementprevot

Copy link
Copy Markdown
Contributor

What is the current behavior, and the steps to reproduce the issue?

When using @react-hookz/web in a component library (like a design system) that uses Storybook, Storybook browses dependencies looking for some dedicated meta in each dependency "package.json" file (storybook field).

But as @react-hooks/web does not export its "package.json" file, Storybook spits the following warning:

unable to find package.json for @react-hookz/web

Its not really an issue, more an annoyance.

What is the expected behavior?

Storybook has access to @react-hooks/web's "package.json" file.

How does this PR fix the problem?

Simply by adding "package.json" as an export of itself :-)

Checklist

  • Have you read contribution guideline?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Is there an existing issue for this PR?
  • Have the files been linted and formatted?
  • Have the docs been updated to match the changes in the PR?
  • Have the tests been updated to match the changes in the PR?
  • Have you run the tests locally to confirm they pass?

Storybook browse dependencies looking for some Storybook dedicated meta in the package.json file.

But as @react-hooks/web does not export its package.json file, Storybook spits a warning

> unable to find package.json for @react-hookz/web

Adding this export solves this warning
@xobotyi
xobotyi merged commit 4ef0a6a into react-hookz:master Jul 25, 2026
@xobotyi

xobotyi commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 25.2.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants